#! /bin/bash
DEFAULT_SOURCES_LIST_URL_STR="DEFAULT_SOURCES_LIST_URL = 'https://gitee.com/li_luoman/source.d/raw/master/20-default.list'"
REP3_TARGETS_URL_STR="REP3_TARGETS_URL = 'https://gitee.com/li_luoman/rosdistro/raw/master/releases/targets.yaml'"
DEFAULT_INDEX_URL_STR="DEFAULT_INDEX_URL = 'https://gitee.com/li_luoman/rosdistro/raw/master/index-v4.yaml'"

sudo sed -i "/^DEFAULT_SOURCES_LIST_URL/c$DEFAULT_SOURCES_LIST_URL_STR" /usr/lib/python3/dist-packages/rosdep2/sources_list.py
sudo sed -i "/^REP3_TARGETS_URL/c$REP3_TARGETS_URL_STR" /usr/lib/python3/dist-packages/rosdep2/rep3.py
sudo sed -i "/^DEFAULT_INDEX_URL/c$DEFAULT_INDEX_URL_STR" /usr/lib/python3/dist-packages/rosdistro/__init__.py